Skip to content

Conversation

@kaushik-himself
Copy link
Contributor

@kaushik-himself kaushik-himself commented May 29, 2025

Description

sets up a vllm proxy to a locally running ollama server. configures a connection and runs tests against it.

removes opentelemetry dumps to console
removes progress pushing state to the console both of which were polluting the logs

Added "HOSTED_VLLM_API_BASE" in UI key for vllm support.
https://docs.litellm.ai/docs/providers/vllm#embeddings

TODO

  • evaluation is not working yet.
  • The evaluation response is empty.
  • remove hard-coded model: accept model and API base as input from the config
  • fix azure
  • fix openai, anthropic and gemini are not working due to config/env params. needs to be debugged and fixed

Steps to run the vllm proxy to ollama locally

  • Install ollama and vllm.
  • Download the llama3.2:3b model
ollama pull llama3.2:3b
  • start the vllm server
cd examples/vllm_server
python vllm_ollama_server.py

Tested by running the command:

compliant-llm test --prompt "You are a helpful assistant" --strategy prompt_injection --provider "hosted_vllm/llama3.2:3b" 

or

compliant-llm test  --config_path  "configs/config.yaml"

or

compliant-llm dashboard

Screenshots/Results

Screenshot 2025-05-29 at 7 11 34 PM

Reference Links

#110

Checklist

This PR includes the following (tick all that apply):

  • Tests added/updated for new/changed functionality
  • Bug Fix (explain the bug in the description)
  • Refactoring or optimizations (no functional changes)
  • Documentation updated (README, docstrings, etc.)
  • Build or deployment related changes
  • Dependency updates (requirements.txt/pyproject.toml)
  • Setup change (update README/setup instructions if required)
  • Code style checks passed (PEP8, flake8, black, etc.)
  • Type hints added/updated (if applicable)
  • Pre-commit hooks run (if configured)

@kaushik-himself kaushik-himself changed the title [WIP] test against a local vllm ollama server test against a local vllm ollama server May 30, 2025
@kaushik-himself kaushik-himself changed the title test against a local vllm ollama server add vllm ollama support May 30, 2025
@kaushik-himself kaushik-himself changed the title add vllm ollama support [WIP] add vllm ollama support May 30, 2025
@neha-nupoor neha-nupoor changed the title [WIP] add vllm ollama support [Feat]: Adding vllm support. May 30, 2025
sets up a vllm proxy to a locally running ollama server.
configures a connection and runs tests against it.

TODO: evaluation is not working yet.
The evaluation response is empty.

TODO: set a different eval model.

removes opentelemetry dumps to console
removes progress pushing state to the console both of which were polluting the logs
removes hardcoded api_base and uses it from the command line instead
setup config for vllm base url
azure connection was not working after vllm api base addition
fixed now.

openai, anthropic and gemini are broken. this is because of the api_key
param
change `os.env`` to `export ENV_VAR=` to set up API connection
environment variables
it is hacky and does not easily run
will fix and add later in a different PR
@kaushik-himself kaushik-himself merged commit 5772a69 into main May 30, 2025
3 checks passed
@kaushik-himself kaushik-himself deleted the feature/vllm branch May 30, 2025 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants